﻿using System.Collections.Generic;
using ZyGames.DZPocker.Model;
using ZyGames.Framework.Game.Contract;
using ZyGames.Framework.Common.Serialization;

namespace ZyGames.DZPocker.Script.CsScript.Action
{
	/// <summary>
	/// 广播某人加入申请保险人页面
	/// </summary>
	public class Action10040 : BaseAction
	{
		private int _tableId;
		private int _userId;
		private string _nickName;
		private string _headIcon;
		private string _headIconBytes;
		public Action10040(HttpGet actionGetter)
			: base((short)ActionType.DZBroadcastApplyEnterInsuranceRoomByInviteNum, actionGetter)
		{
		}
		public override bool GetUrlElement()
		{
			if (httpGet.GetInt("TableID", ref _tableId) &&
				httpGet.GetInt("UserID", ref _userId) &&
				httpGet.GetString("NickName", ref _nickName))
			{

				return true;
			}
			return false;
		}

		public override bool TakeAction()
		{
			return true;
		}

		public override void BuildPacket()
		{
			this.PushIntoStack(_tableId);
			this.PushIntoStack(_userId);
			this.PushIntoStack(_nickName);
		}
	}
}
